<template>
  <div>
    <input type="text" v-model="cityName" />
  </div>
</template>

<script setup>
import { ref, watch } from "vue";
const cityName = ref("北京");
watch(cityName, (newVal, oldVal) => {
  console.log(newVal, oldVal);
});
</script>

<style lang="scss" scoped></style>
